<?php


namespace App\Http\Controllers\Manage\System\Dictionary;


use App\Http\Controllers\Controller;
use App\Http\Searchs\Manage\System\Dictionary\PositiveSearch;
use App\Repositories\Positive;

class PositiveController extends Controller
{
    /**
     * @var Positive
     */
    private $positive;

    /**
     * PositiveController constructor.
     * @param Positive $positive
     */
    public function __construct(Positive $positive)
    {
        $this->positive = $positive;
    }

    /**
     * @param PositiveSearch $search
     * @return \Illuminate\Http\JsonResponse
     */
    public function index(PositiveSearch $search)
    {
        return $this->response(
            $this->positive->paginate($search->toArray())
        );
    }
}
